﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data;
using Common;
//using test;

namespace MvcApplication.Controllers1
{
    public class HomeController : Controller
    {
        [HttpGet]
        public ActionResult Index(int? page)
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";
            MvcPager.mtype = MethodType.Get;
            int CurrentIndex = page != null ? (int)page : 1;
            MvcPager.CurrentPageIndex = CurrentIndex;
            MvcPager.PageSize = 10;
            MvcPager.RecordCount = 750;
            return View();
        }

        [HttpPost]
        public ActionResult Index(FormCollection fc)
        {
            MvcPager.mtype = MethodType.Post;
            MvcPager.CurrentPageIndex = 1;
            MvcPager.PageSize = 10;
            MvcPager.RecordCount = 750;
            MvcPager.Fcollection = fc;
            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
